﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Liquid.Windows {
	public static class TextBoxes {
		public static IDisposable TemporarySelection(this TextBoxBase textBox) {
			var selStart = textBox.SelectionStart;
			var selLength = textBox.SelectionLength;
			return new CallbackDisposable(() => textBox.Select(selStart, selLength));
		}
	}
}
